﻿using GWB.Core.TableEntity.Common;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GWB.Core.TableEntity
{
    /// <summary>
    /// 错误日志
    /// </summary>
    [SugarTable("Sys_ErrorLog")]
    public class ErrorLog
    {
        /// <summary>
        /// Id
        /// </summary>
        [SugarColumn(ColumnDataType = "bigint", IsPrimaryKey = true, ColumnDescription = "主键", IsNullable = false, IsIdentity = true)]
        public long Id { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnDataType = "datetime", ColumnDescription = "创建时间", IsNullable = false)]
        public DateTime CreateAt { get; set; }
        /// <summary>
        ///是否是意料之外的错误
        /// </summary>
        [SugarColumn(ColumnDataType = "bit", ColumnDescription = "是否是意料之外的错误", IsNullable = true)]
        public bool IsUnexpected { get; set; }
        /// <summary>
        ///错误代码
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar(10)", ColumnDescription = "错误代码", IsNullable = true)]
        public string ErrorCode { get; set; }

        [SugarColumn(ColumnDataType = "nvarchar(300)", ColumnDescription = "错误消息", IsNullable = true)]
        public string ErrorMessage { get; set; }

        [SugarColumn(ColumnDataType = "nvarchar(max)", ColumnDescription = "堆栈", IsNullable = true)]
        public string StackTrace { get; set; }

    }
}
